-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor OpenReac optimization tests #83
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: p-arvy <pierre.arvy@artelys.com>
Signed-off-by: p-arvy <pierre.arvy@artelys.com>
Signed-off-by: p-arvy <pierre.arvy@artelys.com>
Signed-off-by: p-arvy <pierre.arvy@artelys.com>
Signed-off-by: p-arvy <pierre.arvy@artelys.com>
Signed-off-by: p-arvy <pierre.arvy@artelys.com>
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for refactoring the tests!
/** | ||
* Runs OpenReac and apply the results on the network. | ||
*/ | ||
void runAndApplyAllModifications(Network network, String subFolder, OpenReacParameters parameters, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not adding the protected
keyword here?
* Add voltage limits to voltage levels with undefined limits. | ||
* OpenReac needs voltage limits to run optimization. | ||
*/ | ||
void setDefaultVoltageLimits(Network network) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remark, why not adding the protected
keyword?
assertEquals(-4.698, network.getBusBreakerView().getBus("BUS_3").getAngle(), 0.001); | ||
} | ||
|
||
public static Network create() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why the method is public
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a bit confusing that this method is named the same than another one in ShuntNetworkFactory (also used in tests).
So maybe change the public
into a private
and change the name into a more explicit one?
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
No.
What kind of change does this PR introduce?
The optimization tests of OpenReac are refactored.
What is the current behavior?
All the tests are in the same file.
What is the new behavior (if this is a feature change)?
The tests have been divided into several files.
This will facilitate the adding of new tests in the future.
Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
What changes might users need to make in their application due to this PR? (migration steps)
Other information: